import HttpRequest from '@/libs/axios'
import config from '@/config'

let baseUrl = ''
console.log('------process.env.NODE_ENV', process.env.VUE_APP_BASE_API)
switch (process.env.VUE_APP_BASE_API) {
  case 'development':
    baseUrl = config.baseUrl.dev
    break
  case 'debug':
    baseUrl = config.baseUrl.debug
    break
  case 'production':
    baseUrl = config.baseUrl.pro
    break
  default:
    baseUrl = config.baseUrl.dev
    break
}
// const baseUrl = process.env.NODE_ENV === 'development' ? config.baseUrl.dev : config.baseUrl.pro

const axios = new HttpRequest(baseUrl)
export default axios
